home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
3.1
/
toasterall
/
arexx_examples
/
lwm
/
metricscale.lwm
< prev
next >
Wrap
Text File
|
1993-06-08
|
805b
|
35 lines
/* CMD: Object to Metric
* Scale object created with numbers in wrong units to metric units
* By Arnie Cachelin © 1993 NewTek, Inc.
*/
call addlib "LWModelerARexx.port", 0
signal on error
signal on syntax
sysnam = 'Object to Metric'
Units='Naut.Mile Mile Yard Foot Inch'
conv.5=.0254 /* meters/inch */
conv.4=12*conv.5
conv.3=3*conv.4
conv.2=5280*conv.4
conv.1=6076*conv.4
call req_begin sysnam
id_tx = req_addcontrol("Scale ","T","1 Meter so it's 1 unit")
id_un = req_addcontrol("Unit:","CV",Units)
if (~req_post()) then do
call req_end()
exit
end
un =abs( req_getval(id_un))
call req_end()
if notify(2,'!Scale object by 'conv.un'?',"( Center at 0,0,0 )") then
call SCALE(conv.un)
exit
syntax:
error:
call end_all
t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
exit